const app = getApp();

Page({
  data: {
    favoritesList: []
  },

  onLoad() {
    this.loadFavoritesList();
  },

  // 加载收藏列表
  loadFavoritesList() {
    // 模拟数据
    const mockFavoritesList = [
      {
        id: 1,
        nickname: '温柔如风',
        age: 58,
        city: '北京市朝阳区',
        avatar: '/images/avatar/user1.jpg',
        datingType: 'partner',
        favoriteTime: '1天前'
      }
    ];

    this.setData({
      favoritesList: mockFavoritesList
    });
  },

  // 查看资料
  viewProfile(e) {
    const id = e.currentTarget.dataset.id;
    wx.navigateTo({
      url: `/pages/user-detail/user-detail?id=${id}`
    });
  },

  // 打招呼
  sayHello(e) {
    const id = e.currentTarget.dataset.id;
    wx.showToast({
      title: '已发送打招呼',
      icon: 'success'
    });
  }
}); 